import request from '@/api/request'
// let BASE_API = 'http://192.168.133.67:8003'
let BASE_API = 'http://43.129.216.51/blog'

// 获取首页信息
export const getIndex = () => {
  return request({
    url: BASE_API+'/article/index',
    method: 'get',
  })
}
// 获取博客类型
export const getCategory = () => {
  return request({
    url: BASE_API+'/category/list',
    method: 'get',
  })
}
// 获取博客列表
export const getBlogList = (data) => {
  return request({
    url: BASE_API+'/article/list',
    method: 'get',
    params: data
  })
}
// 获取博客详情
export const getBlogDetail = (id) => {
  return request({
    url: BASE_API+'/article/'+id,
    method: 'get',
  })
}
//获取下载信息 
export const downloadInfo = (data) => {
  return request({
    url: BASE_API+'/article/downloadInfo?id='+data.id+'&code='+data.code,
    method: 'get',
  })
}
//站内搜索 
export const search = (data) => {
  return request({
    url: BASE_API+'/article/search?keywords='+data,
    method: 'get',
  })
}

//tab搜索 
export const tabSearch = (data) => {
  return request({
    url: BASE_API+'/article/getByTag',
    method: 'get',
    params: data
  })
}